<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        list-style: none;
        text-decoration: none;
      }

      @keyframes move {
        0%,10%{
          transform: translate(0, 0);
        }
        40% ,50%{
          transform: translateX(-300px);
        }
        90%,100% {
          transform: translateX(-600px);
        }
      }

      .box {
        margin: 100px auto;
        position: relative;
        width: 300px;
        height: 200px;
        border: 3px solid #000;
        /* animation: move 6s infinite; */
        overflow: hidden;
        /* animation-name: move ; */
      }
      ul {
        position: absolute;
        display: flex;
        /* width: 00px; */
        height: 100%;
        animation: move 3s alternate infinite;
       
      }
     .box1 {
        width: 300px;
        height: 100%;
        background-color: red;
      }
     .box2 {
        width: 300px;
        height: 100%;
        background-color: green;
      }
      .box3 {
        width: 300px;
        height: 100%;
        background-color: blue;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <ul>
        <li>
          <div class="box1">red</div>
        </li>
        <li><div class="box2">green</div></li>
        <li><div class="box3">blue</div></li>
      </ul>
    </div>
  </body>
</html>
